<template>
  <el-container>
    <el-aside width="200px">2</el-aside>
    <el-main ref="graphRef"></el-main>
  </el-container>
</template>

<script lang="ts" setup>
import Stage from '@/graph/2d/index'

const graphRef = ref()
const stage = ref<Stage>()

onMounted(() => {
  stage.value = new Stage(graphRef.value.$el)
  stage.value.init()
})

onUnmounted(() => {
  stage.value?.destroy()
})
</script>

<style scoped>
.el-aside {
  border-right: 1px solid #ccc;
}

.el-main {
  padding: 0;
}
</style>
